
*Set path here

eststo clear

use "mergeall", clear

******************************************
************ APPENDIX *******************
******************************************

***********************
****** Multilevel *****
***********************

drop part_badge



***Table A2: Demostration

eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party c.unemployment i.year || c_num:  // baseline model
eststo: xtmixed part_demon ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // ideol
eststo: xtmixed part_demon ib5.ideol5 ib1.gender##c.unemployment ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // gender
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r##c.unemployment i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // age
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment i.edu_high pol_interest i.close_party  i.year || c_num: // incomecat
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment pol_interest i.close_party  i.year || c_num: // education

esttab using "tableA2.rtf", ///
mtitles ("M1" "M2" "M3" "M4" "M5" "M6") ///
	starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label  title("Table A2. Multilevel linear probability models on the likelihood of having participated in a demonstration in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) replace

*Table A3: Low-cost participation

eststo clear

eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party c.unemployment i.year || c_num:  // baseline model
eststo: xtmixed part_low2 ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // ideol
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender##c.unemployment ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // gender
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r##c.unemployment i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: // age
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment i.edu_high pol_interest i.close_party  i.year || c_num: // incomecat
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment pol_interest i.close_party  i.year || c_num: // education

esttab using "tableA3.rtf", ///
mtitles ("Baseline model" "Ideology" "Gender" "Age" "Income" "Education") ///
	starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label  title("Table A3. Multilevel linear probability models on the likelihood of having engaged in low-cost participation in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) replace


*Figure A1	Likelihood of participating in a demonstration by ideology and country level of unemployment
eststo: xtmixed part_demon ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) ideol5=(1 2 3 4 5))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA1, replace)
graph export figureA1.pdf, replace
	
*Figure A2 Likelihood of participating in a demonstration by gender and country level of unemployment
eststo: xtmixed part_demon ib5.ideol5 ib1.gender##c.unemployment  ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) gender=(0 1))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA2, replace)
graph export figureA2.pdf, replace

*Figure A3. Likelihood of participating in a demonstration by age and country level of unemployment
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r##c.unemployment   i.h_incomecat i.edu_high pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) age_r=(1(1)4))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA3, replace)
graph export figureA3.pdf, replace

*Figure A4. Likelihood of participating in a demonstration by income and country level of unemployment
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment   i.edu_high pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) h_incomecat=(1 2 3))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA4, replace)
graph export figureA4.pdf, replace

*Figure A5 Likelihood of participating in a demonstration by education and country level of unemployment
eststo: xtmixed part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) edu_high=(0 1))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA5, replace)
graph export figureA5.pdf, replace

*Figure A6 Likelihood of engaging in low-cost participation by ideology and country level of unemployment
eststo: xtmixed part_low2 ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) ideol5=(1 2 3 4 5))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono)  name(figureA6, replace)
graph export figureA6.pdf, replace

*Figure A7 Likelihood of engaging in low-cost participation by gender and country level ofunemployment
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender##c.unemployment ib4.age_r i.h_incomecat i.edu_high    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) gender=(0 1))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono)  name(figureA7, replace)
graph export figureA7.pdf, replace

*Figure A8 Likelihood of engaging in low-cost participation by age and country level of unemployment
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r##c.unemployment i.h_incomecat i.edu_high    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) age_r=(1(1)4))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono)  name(figureA8, replace)
graph export figureA8.pdf, replace

*Figure A9 Likelihood of engaging in low-cost participation by income and country level of unemployment
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment i.edu_high    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) h_incomecat=(1 2 3))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono)  name(figureA9, replace)
graph export figureA9.pdf, replace

*Figure A10 Likelihood of engaging in low-cost participation by education and country level of unemployment
eststo: xtmixed part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment    pol_interest i.close_party  i.year || c_num: 
margins, at(unemployment=(3(2) 25) edu_high=(0 1))
marginsplot, title ("")  ytitle("Likelihood of demonstrating", margin(small)) xtitle ("Unemployment", margin(small)) sch(s1mono) name(figureA10, replace)
graph export figureA10.pdf, replace
	
	
	
****Other models mentioned in the article.
	
eststo clear

*baseline
sureg (demon: part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party c.unemployment i.year) ///
(low: part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party c.unemployment i.year)
eststo sureg_baseline
esttab sureg_baseline using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 1. SUR model on the likelihood of having participated in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) replace

*LR position
sureg (demon: part_demon ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year) ///
(low: part_low2 ib5.ideol5##c.unemployment ib1.gender ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year)
eststo sureg_ideol
esttab sureg_ideol using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 2. SUR model on the likelihood of having participation by ideology in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) append

*Gender
sureg (demon: part_demon ib5.ideol5 ib1.gender##c.unemployment ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year) ///
(low: part_low2 ib5.ideol5 ib1.gender##c.unemployment ib4.age_r i.h_incomecat i.edu_high pol_interest i.close_party  i.year)
eststo sureg_gender
esttab sureg_gender using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 3. SUR model on the likelihood of having participation by gender in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) append

*Age
sureg (demon: part_demon ib5.ideol5 ib1.gender ib4.age_r##c.unemployment i.h_incomecat i.edu_high pol_interest i.close_party  i.year) ///
(low: part_low2 ib5.ideol5 ib1.gender ib4.age_r##c.unemployment i.h_incomecat i.edu_high pol_interest i.close_party  i.year)
eststo sureg_age
esttab sureg_age using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 4. SUR model on the likelihood of having participation by age in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) append

*Income
sureg (demon: part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment i.edu_high pol_interest i.close_party  i.year) /// 
(low: part_low2 ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat##c.unemployment i.edu_high pol_interest i.close_party  i.year)
eststo sureg_income
esttab sureg_income using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 5. SUR model on the likelihood of having participation by income in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) append

*Education
sureg (demon: part_demon ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment pol_interest i.close_party  i.year) ///
(low: part_low ib5.ideol5 ib1.gender ib4.age_r i.h_incomecat i.edu_high##c.unemployment pol_interest i.close_party  i.year)
eststo sureg_education
esttab sureg_education using "sureg2.rtf", unstack ///
starlevels(+ 0.1 * 0.05 ** 0.01 *** 0.001) label mtitles("Demonstration vs Low protest") title("Table 6. SUR model on the likelihood of having participation by education in the last 12 months in 25 countries, 2006-2014") ///
	coeflabels(ideol5 Ideology gender Men pol_interest "Political Interest" unemployment Unemployment ib1.close_party "Closeness to a party") /// 
	drop(*.year) nogaps  nobase noomit eqlabels(none) nonum varwidth(12) modelwidth(5) ///
	b(3) se(3) append	
	



	  